⚙ D147708 [NFC][clang] Fix static analyzer tool remarks about large copies by values | 您所在的位置:网站首页 › llvm 11 › ⚙ D147708 [NFC][clang] Fix static analyzer tool remarks about large copies by values |
Reported by Coverity: Big parameter passed by value Copying large values is inefficient, consider passing by reference; Low, medium, and high size thresholds for detection can be adjusted. Inside "SemaConcept.cpp" file, in subsumes(llvm::SmallVector, llvm::SmallVector, T1): A large function call parameter exceeding the low threshold is passed by value. i. pass_by_value: Passing parameter PDNF of type NormalForm (size 144 bytes) by value, which exceeds the low threshold of 128 bytes.ii. pass_by_value: Passing parameter QCNF of type NormalForm (size 144 bytes) by value, which exceeds the low threshold of 128 bytes. Inside "CodeGenAction.cpp" file, in clang::reportOptRecordError(llvm::Error, clang::DiagnosticsEngine &, clang::CodeGenOptions): A very large function call parameter exceeding the high threshold is passed by value.i. pass_by_value: Passing parameter CodeGenOpts of type clang::CodeGenOptions const (size 1560 bytes) by value, which exceeds the high threshold of 512 bytes. Inside "SemaCodeComplete.cpp" file, in HandleCodeCompleteResults(clang::Sema *, clang::CodeCompleteConsumer *, clang::CodeCompletionContext, clang::CodeCompletionResult *, unsigned int): A large function call parameter exceeding the low threshold is passed by value.i. pass_by_value: Passing parameter Context of type clang::CodeCompletionContext (size 200 bytes) by value, which exceeds the low threshold of 128 bytes. Inside "SemaConcept.cpp" file, in ::SatisfactionStackRAII::SatisfactionStackRAII(clang::Sema &, clang::NamedDecl const *, llvm::FoldingSetNodeID): A large function call parameter exceeding the low threshold is passed by value.i. pass_by_value: Passing parameter FSNID of type llvm::FoldingSetNodeID (size 144 bytes) by value, which exceeds the low threshold of 128 bytes. |
CopyRight 2018-2019 实验室设备网 版权所有 |